import request from '@/utils/request'

const apiUrl = '/api/leave/register'

export function getLeaveRegisterPage(params) {
    return request({
        url: `${apiUrl}/page`,
        method: 'get',
        params
    })
}

export function getLeaveRegisterById(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'get'
    })
}

export function saveLeaveRegister(data) {
    return request({
        url: `${apiUrl}/save`,
        method: 'post',
        data
    })
}

export function deleteLeaveRegister(id) {
    return request({
        url: `${apiUrl}/${id}`,
        method: 'delete'
    })
}

export function batchDeleteLeaveRegister(ids) {
    return request({
        url: `${apiUrl}/batch`,
        method: 'delete',
        data: ids
    })
} 